<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<c:url value="/" var="baseUrl" />
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="${baseUrl}css/main.css">

<title>修改订单</title>
</head>
<body>
	<jsp:include page="../header.jsp" />
	<c:url value="/front/ChgOrder" var="url" />
	<form action="${url}" method="post">
		<table align="center">
			<caption>修改订单</caption>
			<tr>
				<td colspan="3" align="center">
				${error.error}
				<input type="hidden" name="id" value="${input.id }"/>
				</td>
			</tr>
			<tr>
				<th>产品名称：</th>
				<td><input type="text" name="productName"
					value="${input.productName}" /></td>
				<td>${error.productName}</td>
			</tr>
			<tr>
				<th>单&nbsp;&nbsp;&nbsp;&nbsp;价：</th>
				<td><input type="text" name="unitPrice"
					value="${input.unitPrice}" /></td>
				<td>${error.unitPrice}</td>
			</tr>
			<tr>
				<th>数&nbsp;&nbsp;&nbsp;&nbsp;量：</th>
				<td><input type="text" name="quantity"
					value="${input.quantity}" /></td>
				<td>${error.quantity}</td>
			</tr>
			<tr>
				<th>供&nbsp;应&nbsp;商：</th>
				<td><select name="supplier">
						<option value="">请选择 ......</option>
						<c:forEach var="supplier" items="${allSuppliers}">
							<c:if test="${supplier.id==input.supplier}">
								<c:set value="selected=\"selected\"" var="selected" />
							</c:if>
							<c:if test="${supplier.id!=input.supplier}">
								<c:set value="" var="selected" />
							</c:if>
							<option value="${supplier.id}" ${selected}>${supplier.companyName}</option>
						</c:forEach>

				</select></td>
				<td>${error.supplier}</td>
			</tr>
			<tr>
				<th>快递公司：</th>
				<td><select name="express">
						<option value="">请选择 ......</option>
						<c:forEach var="express" items="${allExpresses}">
							<c:if test="${express.id==input.express}">
								<c:set value="selected=\"selected\"" var="selected" />
							</c:if>
							<c:if test="${express.id!=input.express}">
								<c:set value="" var="selected" />
							</c:if>
							<option value="${express.id}" ${selected}>${express.companyName}</option>
						</c:forEach>
				</select></td>
				<td>${error.express}</td>
			</tr>

			<tr>
				<th>快递单号：</th>
				<td><input type="text" name="expressNumber"
					value="${input.expressNumber}" /></td>
				<td>${error.expressNumber}</td>
			</tr>
			<tr>
				<td colspan="3" align="center"><input type="submit" value="确定" /></td>
			</tr>
		</table>
	</form>
</body>
</html>